<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8" />
	<title>{$ext->title}-{APPNAME}</title>
	<meta http-equiv="X-UA-Compatible" content="IE=edge" />
	<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
	<script src="//cdn.bootcss.com/jquery/2.2.0/jquery.min.js"></script>
	<script src="//cdn.bootcss.com/marked/0.4.0/marked.min.js"></script>
	<script src="https://cdn.bootcss.com/prism/1.14.0/prism.min.js"></script>
	<script src="https://cdn.bootcss.com/prism/1.14.0/components/prism-bash.min.js"></script>
	{$js}
	<link href="//cdn.bootcss.com/font-awesome/4.6.3/css/font-awesome.css" rel="stylesheet">
	<link href="//cdn.bootcss.com/octicons/3.5.0/octicons.min.css" rel="stylesheet">
	<link rel="stylesheet" type="text/css" href="https://cdn.bootcss.com/prism/1.14.0/themes/prism.min.css">
	<link rel="stylesheet" type="text/css" href="/file/css/github-markdown.css">

</head>

<body>

	<div id="header">
		<h1 id="header-title">{$ext->title}</h1>
	</div>
	<div id="content" style="padding: 16px;"><div class="markdown-body" id="editor-show"><pre>{$content}</pre></div>
	</div>
</body>
<script type="text/javascript">
	$(document).ready(function(){
		var content=$("#editor-show pre").html();
		content=content.replace(/&lt;/g,"<");
		content=content.replace(/&gt;/g,">");
		$("#editor-show").html(marked(content));
		if(CODESTATUS==1){
			codes=$("#editor-show pre code");
			langs={"[html]":"language-markup","[javascript]":"language-javascript","[js]":"language-javascript","[css]":"language-css",
				"[python]":"language-python","[php]":"language-php","[perl]":"language-perl",
				"[c]":"language-c","[c++]":"language-cpp","[c#]":"language-csharp",
				"[java]":"language-java","[go]":"language-go","[ruby]":"language-ruby",
				"[markdown]":"language-markdown","[less]":"language-less","[ini]":"language-ini","[bash]":"language-bash"
			}
			for(var x=0;x<codes.length;x++){
				first_line=codes[x].innerHTML.split('\n',1)[0];
				first_line_lower=first_line.toLowerCase()
				//codes[x].className="language-markup";
				var l='';
				for(l in langs){
					if(first_line_lower==l){
						codes[x].innerHTML=codes[x].innerHTML.split(first_line+'\n',2)[1];
						codes[x].className=langs[l];
					}
				}
				if(codes[x].className.toLowerCase().indexOf('language')==-1){codes[x].className="language-markup"} 
			}
		}
	})
</script>
</html>
